PresentationRequest

A JavaScript PresentationRequest.


    browser.set(StartPresentationCallback.class, (params, tell) -> {
        Optional<MediaReceiver> mediaReceiver =
                params.list()
                      .stream()
                      .filter(it -> it.name().startsWith("Samsung TV"))
                      .findAny();
        if (mediaReceiver.isPresent()) {
            MediaReceiver samsungTv = mediaReceiver.get();
            if (samsungTv.supports(params.presentationRequest())) {
                tell.start(samsungTv);
            } else {
                tell.cancel();
            }
        } else {
            tell.cancel();
        }
    });

Since

7.29

Functions

Link copied to clipboard
open fun browser(): MediaSource
Returns a media source that represents any browser's content.
Link copied to clipboard
open fun frame(): Frame
Returns the frame where the presentation has been requested.
Link copied to clipboard
open fun origin(): String
Returns the origin of the frame where the presentation has been requested.
Link copied to clipboard
Returns the list of URLs whose content will be cast.
Link copied to clipboard
open fun screen(): MediaSource
Returns a media source that represents any screen's content.